function [ ret ] = get_patterns()

global TRAINING_PERCENTAGE;

% get_patterns:
% Esta funcion retorna los patrones a utilizar, tanto de entrenamiento como
% de testeo.

load samples6.txt;
samples = samples6;
clear samples6;

indexes = randperm(length(samples));
training_quantity_patterns = round(length(samples)*TRAINING_PERCENTAGE);
training_indexes = indexes(1:training_quantity_patterns);
testing_indexes = indexes(training_quantity_patterns+1:length(samples));

training_patterns = zeros(length(training_indexes), length(samples(1,:))+1);
for i = 1:length(training_indexes)
    training_patterns(i,:) = horzcat(-1, samples(i,:));
end
ret{1} = training_patterns';

testing_patterns = zeros(length(testing_indexes), length(samples(1,:))+1);
for i = 1:length(testing_indexes)
    testing_patterns(i,:) = horzcat(-1, samples(training_quantity_patterns+i,:));
end
ret{2} = testing_patterns';

end

